package com.totoro.tyrank.executor.action.impl;

import com.totoro.tyrank.constants.ActionConst;
import com.totoro.tyrank.executor.action.ActionExecutor;
import com.totoro.tyrank.utils.PapiUtil;
import com.totoro.tyrank.utils.StrUtil;
import org.bukkit.entity.Player;

public class MessageActionExecutor implements ActionExecutor {
    @Override
    public void execute(String actionText, Player player) {
        String message = StrUtil.getContentAfter(actionText, ActionConst.MESSAGE);
        message = PapiUtil.parseStrPapiVariable(player, message);
        player.sendMessage(message);
    }
}
